home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
SGI Origin & Onyx2 Patches 1998 May
/
Origin and Onyx2 System Disk Patches May 1998.img
/
dist
/
patchSG0002871.idb
/
usr
/
include
/
sys
/
invent.h.z
/
invent.h
Wrap
C/C++ Source or Header
|
1998-03-05
|
21KB
|
543 lines
#ifndef __SYS_INVENT_H__
#define __SYS_INVENT_H__
/*
* sys/invent.h -- Kernel Hardware Inventory
*
* As the system boots, a list of recognized devices is assembled.
* This list can then be accessed through syssgi() by user-level programs
* so that they can learn about available peripherals and the system's
* hardware configuration.
*
* The data is organized into a linked list of structures that are composed
* of an inventory item class and a class-specific type. Each instance may
* also specify a 32-bit "state" which might be size, readiness, or
* anything else that's relevant.
*
*
* $Revision: 1.226 $
*
* Copyright 1988-1994, Silicon Graphics, Inc.
* All Rights Reserved.
*
* This is UNPUBLISHED PROPRIETARY SOURCE CODE of Silicon Graphics, Inc.;
* the contents of this file may not be disclosed to third parties, copied or
* duplicated in any form, in whole or in part, without the prior written
* permission of Silicon Graphics, Inc.
*
* RESTRICTED RIGHTS LEGEND:
* Use, duplication or disclosure by the Government is subject to restrictions
* as set forth in subdivision (c)(1)(ii) of the Rights in Technical Data
* and Computer Software clause at DFARS 252.227-7013, and/or in similar or
* successor clauses in the FAR, DOD or NASA FAR Supplement. Unpublished -
* rights reserved under the Copyright Laws of the United States.
*/
#include "sys/types.h"
typedef struct inventory_s {
struct inventory_s *inv_next; /* next inventory record in list */
int inv_class; /* class of object */
int inv_type; /* class sub-type of object */
major_t inv_controller; /* object major identifier */
minor_t inv_unit; /* object minor identifier */
int inv_state; /* information specific to object or
class */
} inventory_t;
typedef struct cpu_inv_s {
int cpuflavor; /* differentiate processor */
int cpufq; /* cpu frequency */
int sdsize; /* secondary data cache size */
} cpu_inv_t;
/* Inventory Classes */
/* when adding a new class, add also to classes[] in hinv.c */
#define INV_PROCESSOR 1
#define INV_DISK 2
#define INV_MEMORY 3
#define INV_SERIAL 4
#define INV_PARALLEL 5
#define INV_TAPE 6
#define INV_GRAPHICS 7
#define INV_NETWORK 8
#define INV_SCSI 9 /* SCSI devices other than disk and tape */
#define INV_AUDIO 10
#define INV_IOBD 11
#define INV_VIDEO 12
#define INV_BUS 13
#define INV_MISC 14 /* miscellaneous: a catchall */
/*** add post-5.2 classes here for backward compatibility ***/
#define INV_COMPRESSION 15
#define INV_VSCSI 16 /* SCSI devices on jag other than disk and tape */
#define INV_DISPLAY 17
#define INV_UNC_SCSILUN 18 /* Unconnected SCSI lun */
#define INV_PCI 19 /* PCI Bus */
#define INV_PCI_NO_DRV 20 /* PCI Bus without any driver */
#define INV_PROM 21 /* Different proms in the system */
/* types for class processor */
#define INV_CPUBOARD 1
#define INV_CPUCHIP 2
#define INV_FPUCHIP 3
#define INV_CCSYNC 4 /* CC Rev 2+ sync join counter */
/* states for cpu and fpu chips are revision numbers */
/* cpuboard states */
#define INV_IP20BOARD 10
#define INV_IP19BOARD 11
#define INV_IP22BOARD 12
#define INV_IP21BOARD 13
#define INV_IP26BOARD 14
#define INV_IP25BOARD 15
#define INV_IP30BOARD 16
#define INV_IP28BOARD 17
#define INV_IP32BOARD 18
#define INV_IP27BOARD 19
#define INV_IPMHSIMBOARD 20
/* types for class INV_IOBD */
#define INV_EVIO 2 /* EVEREST I/O board */
#define INV_O200IO 3 /* Origin 200 base I/O */
/* states for class INV_IOBD type INV_EVERESTIO -- value of eb_type field */
#define INV_IO4_REV1 0x21
/* types for class disk */
/* NB: types MUST be unique within a class.
Please check this if adding new types. */
#define INV_SCSICONTROL 1
#define INV_SCSIDRIVE 2
#define INV_SCSIFLOPPY 5 /* also cdroms, optical disks, etc. */
#define INV_JAGUAR 16 /* Interphase Jaguar */
#define INV_VSCSIDRIVE 17 /* Disk connected to Jaguar */
#define INV_GIO_SCSICONTROL 18 /* optional GIO SCSI controller */
#define INV_SCSIRAID 19 /* SCSI attached RAID */
#define INV_XLVGEN 20 /* Generic XLV disk device */
#define INV_PCCARD 21 /* PC-card (PCMCIA) devices */
#define INV_PCI_SCSICONTROL 22 /* optional PCI SCSI controller */
/* states for INV_SCSICONTROL disk type; indicate which chip rev;
* for 93A and B, unit field has microcode rev. */
#define INV_WD93 0 /* WD 33C93 */
#define INV_WD93A 1 /* WD 33C93A */
#define INV_WD93B 2 /* WD 33C93B */
#define INV_WD95A 3 /* WD 33C95A */
#define INV_SCIP95 4 /* SCIP with a WD 33C95A */
#define INV_ADP7880 5 /* Adaptec 7880 (single channel) */
#define INV_QL_REV1 6 /* qlogic 1040 */
#define INV_QL_REV2 7 /* qlogic 1040A */
#define INV_QL_REV2_4 8 /* qlogic 1040A rev 4 */
#define INV_QL_REV3 9 /* qlogic 1040B */
#define INV_FCADP 10 /* Adaptec Emerald Fibrechannel */
#define INV_QL_REV4 11 /* qlogic 1040B rev 2 */
#define INV_QL 12 /* Unknown QL version */
/* states for INV_SCSIDRIVE type of class disk */
#define INV_RAID5_LUN 0x100
/* states for INV_SCSIFLOPPY type of class disk */
#define INV_TEAC_FLOPPY 1 /* TEAC 3 1/2 inch floppy drive */
#define INV_INSITE_FLOPPY 2 /* INSITE, IOMEGA Io20S, SyQuest floppy drives */
/* END OF CLASS DISK TYPES */
/* types for class memory */
/* NB. the states for class memory are sizes in bytes */
#define INV_MAIN 1
#define INV_DCACHE 3
#define INV_ICACHE 4
#define INV_WBUFFER 5
#define INV_SDCACHE 6
#define INV_SICACHE 7
#define INV_SIDCACHE 8
#define INV_MAIN_MB 9
#define INV_HUBSPC 10 /* HUBSPC */
/* types for class serial */
#define INV_CDSIO 1 /* Central Data serial board */
#define INV_T3270 2 /* T3270 emulation */
#define INV_GSE 3 /* SpectraGraphics Gerbil coax cable */
#define INV_SI 4 /* SNA SDLC controller */
#define INV_M333X25 6 /* X.25 controller */
#define INV_CDSIO_E 7 /* Central Data serial board on E space */
#define INV_ONBOARD 8 /* Serial ports per CPU board */
#define INV_EPC_SERIAL 9 /* EVEREST I/O EPC serial port */
#define INV_ICA 10 /* IRIS (IBM) Channel Adapter card */
#define INV_VSC 11 /* SBE VME Synch Comm board */
#define INV_ISC 12 /* SBE ISA Synch Comm board */
#define INV_GSC 13 /* SGI GIO Synch Comm board */
#define INV_ASO_SERIAL 14 /* serial portion of SGI ASO board */
#define INV_PSC 15 /* SBE PCI Synch Comm board */
#define INV_IOC3_DMA 16 /* DMA mode IOC3 serial */
#define INV_IOC3_PIO 17 /* PIO mode IOC3 serial */
/* types for class parallel */
#define INV_GPIB 2 /* National Instrument GPIB board */
#define INV_GPIB_E 3 /* National Instrument GPIB board on E space*/
#define INV_EPC_PLP 4 /* EVEREST I/O EPC Parallel Port */
#define INV_ONBOARD_PLP 5 /* Integral parallel port,
state = 0 -> output only
state = 1 -> bi-directional */
#define INV_EPP_ECP_PLP 6 /* Integral EPP/ECP parallel port */
/* types for class tape */
#define INV_SCSIQIC 1 /* Any SCSI tape, not just QIC{24,150}... */
#define INV_VSCSITAPE 4 /* SCSI tape connected to Jaguar */
/* sub types for type INV_SCSIQIC and INV_VSCSITAPE (in state) */
#define TPUNKNOWN 0 /* type not known */
#define TPQIC24 1 /* QIC24 1/4" cartridge */
#define TPDAT 2 /* 4mm Digital Audio Tape cartridge */
#define TPQIC150 3 /* QIC150 1/4" cartridge */
#define TP9TRACK 4 /* 9 track reel */
#define TP8MM_8200 5 /* 8 mm video tape cartridge */
#define TP8MM_8500 6 /* 8 mm video tape cartridge */
#define TPQIC1000 7 /* QIC1000 1/4" cartridge */
#define TPQIC1350 8 /* QIC1350 1/4" cartridge */
#define TP3480 9 /* 3480 compatible cartridge */
#define TPDLT 10 /* DEC Digital Linear Tape cartridge */
#define TPD2 11 /* D2 tape cartridge */
#define TPDLTSTACKER 12 /* DEC Digital Linear Tape stacker */
#define TPNTP 13 /* IBM Magstar cartridge */
#define TPNTPSTACKER 14 /* IBM Magstar stacker */
#define TPSTK9490 15 /* StorageTeK 9490 */
#define TPSTKSD3 16 /* StorageTeK SD3 */
#define TPGY10 17 /* Sony GY-10 */
#define TP8MM_8900 18 /* 8 mm (AME) tape cartridge */
#define TPMGSTRMP 19 /* IBM Magstar MP cartridge */
#define TPMGSTRMPSTCKR 20 /* IBM Magstar MP stacker */
#define TPSTK4791 21 /* StorageTek 4791 */
#define TPSTK4781 22 /* StorageTek 4781 */
#define TPFUJDIANA1 23 /* Fujitsu Diana-1 (M101) */
#define TPFUJDIANA2 24 /* Fujitsu Diana-2 (M2483) */
#define TPFUJDIANA3 25 /* Fujitsu Diana-3 (M2488) */
#define TP8MM_AIT 26 /* Sony AIT format tape */
#define TPTD3600 27 /* Philips TD3600 */
#define TPTD3600STCKR 28 /* Philips TD3600 stacker */
#define TPNCTP 29 /* Philips NCTP */
#define TPGY2120 30 /* Sony GY-2120 (replaces GY-10) */
/*
* GFX invent is a subset of gfxinfo
*/
/* types for class graphics */
#define INV_GR1BOARD 1 /* GR1 (Eclipse) graphics */
#define INV_GR1BP 2 /* OBSOLETE - use INV_GR1BIT24 instead */
#define INV_GR1ZBUFFER 3 /* OBSOLETE - use INV_GR1ZBUF24 instead */
#define INV_GRODEV 4 /* Clover1 graphics */
#define INV_GMDEV 5 /* GT graphics */
#define INV_CG2 6 /* CG2 composite video/genlock board */
#define INV_VMUXBOARD 7 /* VMUX video mux board */
#define INV_VGX 8 /* VGX (PowerVision) graphics */
#define INV_VGXT 9 /* VGXT (PowerVision) graphics with IMP5s. */
#define INV_LIGHT 10 /* LIGHT graphics */
#define INV_GR2 11 /* EXPRESS graphics */
#define INV_RE 12 /* RealityEngine graphics */
#define INV_VTX 13 /* RealityEngine graphics - VTX variant */
#define INV_NEWPORT 14 /* Newport graphics */
#define INV_MGRAS 15 /* Mardigras graphics */
#define INV_IR 16 /* InfiniteReality graphics */
#define INV_CRIME 17 /* Moosehead on board CRIME graphics */
#define INV_IR2 18 /* Onyx2 InfiniteReality2 graphics */
#define INV_IR2LITE 19 /* Onyx2 Reality graphics */
/* states for graphics class GR1 */
#define INV_GR1REMASK 0x7 /* RE version */
#define INV_GR1REUNK 0x0 /* RE version unknown */
#define INV_GR1RE1 0x1 /* RE1 */
#define INV_GR1RE2 0x2 /* RE2 */
#define INV_GR1BUSMASK 0x38 /* GR1 bus architecture */
#define INV_GR1PB 0x00 /* Eclipse private bus */
#define INV_GR1PBVME 0x08 /* VGR2 board VME and private bus interfaces */
#define INV_GR1TURBO 0x40 /* has turbo option */
#define INV_GR1BIT24 0x80 /* has bitplane option */
#define INV_GR1ZBUF24 0x100 /* has z-buffer option */
#define INV_GR1SMALLMON 0x200 /* using 14" monitor */
#define INV_GR1SMALLMAP 0x400 /* has 256 entry color map */
#define INV_GR1AUX4 0x800 /* has AUX/WID plane option */
/* states for graphics class GR2 */
/* bitmasks */
#define INV_GR2_Z 0x1 /* has z-buffer option */
#define INV_GR2_24 0x2 /* has bitplane option */
#define INV_GR2_4GE 0x4 /* has 4 GEs */
#define INV_GR2_1GE 0x8 /* has 1 GEs */
#define INV_GR2_2GE 0x10 /* has 2 GEs */
#define INV_GR2_8GE 0x20 /* has 8 GEs */
#define INV_GR2_GR3 0x40 /* board GR3 */
#define INV_GR2_GU1 0x80 /* board GU1 */
#define INV_GR2_INDY 0x100 /* board GR3 on Indy*/
#define INV_GR2_GR5 0x200 /* board GR3 with 4 GEs, hinv prints GR5-XZ */
/* supported configurations */
#define INV_GR2_XS 0x0 /* GR2-XS */
#define INV_GR2_XSZ 0x1 /* GR2-XS with z-buffer */
#define INV_GR2_XS24 0x2 /* GR2-XS24 */
#define INV_GR2_XS24Z 0x3 /* GR2-XS24 with z-buffer */
#define INV_GR2_XSM 0x4 /* GR2-XSM */
#define INV_GR2_ELAN 0x7 /* GR2-Elan */
#define INV_GR2_XZ 0x13 /* GR2-XZ */
#define INV_GR3_XSM 0x44 /* GR3-XSM */
#define INV_GR3_ELAN 0x47 /* GR3-Elan */
#define INV_GU1_EXTREME 0xa3 /* GU1-Extreme */
/* States for graphics class NEWPORT */
#define INV_NEWPORT_XL 0x01 /* Indigo2 XL model */
#define INV_NEWPORT_24 0x02 /* board has 24 bitplanes */
#define INV_NEWTON 0x04 /* Triton SUBGR tagging */
/* States for graphics class MGRAS */
#define INV_MGRAS_ARCHS 0xff000000 /* architectures */
#define INV_MGRAS_HQ3 0x00000000 /* impact */
#define INV_MGRAS_HQ4 0x01000000 /* gamera */
#define INV_MGRAS_MOT 0x02000000 /* mothra */
#define INV_MGRAS_GES 0x00ff0000 /* number of GEs */
#define INV_MGRAS_1GE 0x00010000
#define INV_MGRAS_2GE 0x00020000
#define INV_MGRAS_RES 0x0000ff00 /* number of REs */
#define INV_MGRAS_1RE 0x00000100
#define INV_MGRAS_2RE 0x00000200
#define INV_MGRAS_TRS 0x000000ff /* number of TRAMs */
#define INV_MGRAS_0TR 0x00000000
#define INV_MGRAS_1TR 0x00000001
#define INV_MGRAS_2TR 0x00000002
/* types for class network */
#define INV_NET_ETHER 0 /* 10Mb Ethernet */
#define INV_NET_HYPER 1 /* HyperNet */
#define INV_NET_CRAYIOS 2 /* Cray Input/Ouput Subsystem */
#define INV_NET_FDDI 3 /* FDDI */
#define INV_NET_TOKEN 4 /* 16/4 Token Ring */
#define INV_NET_HIPPI 5 /* HIPPI */
#define INV_NET_ATM 6 /* ATM */
#define INV_NET_ISDN_BRI 7 /* ISDN */
#define INV_NET_ISDN_PRI 8 /* PRI ISDN */
#define INV_NET_HIPPIS 9 /* HIPPI-Serial */
/* controllers for network types, unique within class network */
#define INV_ETHER_EC 0 /* IP6 integral controller */
#define INV_ETHER_ENP 1 /* CMC board */
#define INV_ETHER_ET 2 /* IP5 integral controller */
#define INV_HYPER_HY 3 /* HyperNet controller */
#define INV_CRAYIOS_CFEI3 4 /* Cray Front End Interface, v3 */
#define INV_FDDI_IMF 5 /* Interphase/Martin 3211 FDDI */
#define INV_ETHER_EGL 6 /* Interphase V/4207 Eagle */
#define INV_ETHER_FXP 7 /* CMC C/130 FXP */
#define INV_FDDI_IPG 8 /* Interphase/SGI 4211 Peregrine FDDI */
#define INV_TOKEN_FV 9 /* Formation fv1600 Token-Ring board */
#define INV_FDDI_XPI 10 /* XPI GIO bus FDDI */
#define INV_TOKEN_GTR 11 /* GTR GIO bus TokenRing */
#define INV_ETHER_GIO 12 /* IP12/20 optional GIO ethernet controller */
#define INV_ETHER_EE 13 /* Everest IO4 EPC SEEQ/EDLC */
#define INV_HIO_HIPPI 14 /* HIO HIPPI for Challenge/Onyx */
#define INV_ATM_GIO64 15 /* ATM OC-3c Mez card */
#define INV_ETHER_EP 16 /* 8-port E-Plex Ethernet */
#define INV_ISDN_SM 17 /* Siemens PEB 2085 */
#define INV_TOKEN_MTR 18 /* EISA TokenRing */
#define INV_ETHER_EF 19 /* IOC3 Ethernet */
#define INV_ISDN_48XP 20 /* Xircom PRI-48XP */
#define INV_FDDI_RNS 21 /* Rockwell Network Systems FDDI */
#define INV_HIPPIS_XTK 22 /* Xtalk HIPPI-Serial */
#define INV_ATM_QUADOC3 23 /* Xtalk Quad OC-3c ATM interface */
#define INV_TOKEN_MTRPCI 24 /* PCI TokenRing */
/* Types for class INV_SCSI and INV_VSCSI; The type code is the same as
* the device type code returned by the Inquiry command, iff the Inquiry
* command defines a type code for the device in question. If it doesn't,
* values over 31 will be used for the device type.
* Note: the lun is encoded in bits 8-15 of the state. The
* state field low 3 bits contains the information from the inquiry
* cmd that indicates ANSI SCSI 1,2, etc. compliance, and bit 7
* contains the inquiry info that indicates whether the media is
* removable.
*/
#define INV_PRINTER 2 /* SCSI printer */
#define INV_CPU 3 /* SCSI CPU device */
#define INV_WORM 4 /* write-once-read-many (e.g. optical disks) */
#define INV_CDROM 5 /* CD-ROM */
#define INV_SCANNER 6 /* scanners */
#define INV_OPTICAL 7 /* optical disks (read-write) */
#define INV_CHANGER 8 /* jukebox's for CDROMS, for example */
#define INV_COMM 9 /* Communications device */
#define INV_RAIDCTLR 32 /* RAID ctlr actually gives type 0 */
/* bit definitions for state field for class INV_SCSI */
#define INV_REMOVE 0x80 /* has removable media */
#define INV_SCSI_MASK 7 /* to which ANSI SCSI standard device conforms*/
/* types for class INV_AUDIO */
#define INV_AUDIO_HDSP 0 /* Indigo DSP system */
#define INV_AUDIO_VIGRA110 1 /* ViGRA 110 audio board */
#define INV_AUDIO_VIGRA210 2 /* ViGRA 210 audio board */
#define INV_AUDIO_A2 3 /* HAL2 / Audio Module for Indigo 2 */
#define INV_AUDIO_A3 4 /* Moosehead (IP32) AD1843 codec */
#define INV_AUDIO_RAD 5 /* RAD PCI chip */
/* types for class INV_VIDEO */
#define INV_VIDEO_LIGHT 0
#define INV_VIDEO_VS2 1 /* MultiChannel Option */
#define INV_VIDEO_EXPRESS 2 /* kaleidecope video */
#define INV_VIDEO_VINO 3
#define INV_VIDEO_VO2 4 /* Sirius Video */
#define INV_VIDEO_INDY 5 /* Indy Video - kal vid on Newport
gfx on Indy */
#define INV_VIDEO_MVP 6 /* Moosehead Video Ports */
#define INV_VIDEO_INDY_601 7 /* Indy Video 601 */
#define INV_VIDEO_PMUX 8 /* PALMUX video w/ PGR gfx */
#define INV_VIDEO_MGRAS 9 /* Galileo 1.5 video */
#define INV_VIDEO_DIVO 10 /* DIVO video */
#define INV_VIDEO_RACER 11 /* SpeedRacer Pro Video */
#define INV_VIDEO_EVO 12 /* EVO Personal Video */
/* states for video class INV_VIDEO_EXPRESS */
#define INV_GALILEO_REV 0xF
#define INV_GALILEO_JUNIOR 0x10
#define INV_GALILEO_INDY_CAM 0x20
#define INV_GALILEO_DBOB 0x40
#define INV_GALILEO_ELANTEC 0x80
/* states for video class VINO */
#define INV_VINO_REV 0xF
#define INV_VINO_INDY_CAM 0x10
#define INV_VINO_INDY_NOSW 0x20 /* nebulous - means s/w not installed */
/* states for video class MVP */
#define INV_MVP_REV(x) (((x)&0x0000000f))
#define INV_MVP_REV_SW(x) (((x)&0x000000f0)>>4)
#define INV_MVP_AV_BOARD(x) (((x)&0x00000f00)>>8)
#define INV_MVP_AV_REV(x) (((x)&0x0000f000)>>12)
#define INV_MVP_CAMERA(x) (((x)&0x000f0000)>>16)
#define INV_MVP_CAM_REV(x) (((x)&0x00f00000)>>20)
/* types for class INV_BUS */
#define INV_BUS_VME 0
#define INV_BUS_EISA 1
#define INV_BUS_GIO 2
#define INV_BUS_BT3_PCI 3
/* types for class INV_MISC */
#define INV_MISC_EPC_EINT 0 /* EPC external interrupts */
#define INV_MISC_PCKM 1 /* pc keyboard or mouse */
#define INV_MISC_IOC3_EINT 2 /* IOC3 external interrupts */
/* types for class INV_PROM */
#define INV_IO6PROM 0
#define INV_IP27PROM 1
#define INV_FCNVRAM 2
/* types for class INV_COMPRESSION */
#define INV_COSMO 0
#define INV_INDYCOMP 1
#define INV_IMPACTCOMP 2 /* cosmo2, aka impact compression */
#define INV_VICE 3 /* Video imaging & compression engine */
/* types for class INV_DISPLAY */
#define INV_PRESENTER_BOARD 0 /* Indy Presenter adapter board */
#define INV_PRESENTER_PANEL 1 /* Indy Presenter board and panel */
#define INV_ICO_BOARD 2 /* IMPACT channel option board */
typedef struct invent_generic_s {
unsigned short ig_module;
unsigned short ig_slot;
unsigned char ig_flag;
int ig_invclass;
} invent_generic_t;
#define INVENT_ENABLED 0x1
typedef struct invent_membnkinfo {
unsigned short imb_size; /* bank size in MB */
unsigned short imb_attr; /* Mem attributes */
unsigned int imb_flag; /* bank flags */
} invent_membnkinfo_t;
typedef struct invent_meminfo {
invent_generic_t im_gen;
unsigned short im_size; /* memory size */
unsigned short im_banks; /* number of banks */
/*
* declare an array with one element. Each platform is expected to
* allocate the size required based on the number of banks and set
* the im_banks correctly for this array traversal.
*/
invent_membnkinfo_t im_bank_info[1];
} invent_meminfo_t;
#define INV_MEM_PREMIUM 0x01
typedef struct invent_cpuinfo {
invent_generic_t ic_gen;
cpu_inv_t ic_cpu_info;
unsigned short ic_cpuid;
unsigned short ic_slice;
} invent_cpuinfo_t;
typedef struct invent_miscinfo {
invent_generic_t im_gen;
int im_rev;
int im_type;
} invent_miscinfo_t;
#define MISC_INVENT_HUB 1
#ifdef _KERNEL
#include "sys/graph.h"
#include "sys/hwgraph.h"
typedef struct irix5_inventory_s {
app32_ptr_t inv_next; /* next inventory record in list */
int inv_class; /* class of object */
int inv_type; /* class sub-type of object */
major_t inv_controller; /* object major identifier */
minor_t inv_unit; /* object minor identifier */
int inv_state; /* information specific to object or
class */
} irix5_inventory_t;
typedef struct invplace_s {
vertex_hdl_t invplace_vhdl; /* current vertex */
graph_vertex_place_t invplace_vplace; /* place in vertex list */
inventory_t *invplace_inv; /* place in inv list on vertex */
} invplace_t; /* Magic cookie placeholder in inventory list */
#define INVPLACE_NONE invplace_none
extern void add_to_inventory(int, int, int, int, int);
extern void replace_in_inventory(inventory_t *, int, int, int, int, int);
extern inventory_t *get_next_inventory(invplace_t *);
extern inventory_t *find_inventory(inventory_t *, int, int, int, int, int);
extern int scaninvent(int (*)(inventory_t *, void *), void *);
extern int get_sizeof_inventory(int);
extern void device_inventory_add( dev_t device,
int class,
int type,
major_t ctlr,
minor_t unit,
int state);
extern inventory_t *device_inventory_get_next( dev_t device,
invplace_t *);
extern void device_controller_num_set( dev_t,
int);
extern int device_controller_num_get( dev_t);
#endif /* _KERNEL */
#endif /* __SYS_INVENT_H__ */